﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace frmPrincipal
{
    public partial class frmConAttendants : Form
    {
        private int callWidth;
        private int callHeight;

        public frmConAttendants()
        {
            this.callWidth = 400;
            this.callHeight = 300;

            InitializeComponent();
        }

        //Chama os Respectivos formulários
        private void btnSearchAll_Click(object sender, EventArgs e)
        {
            frmConsultaBasica allColumnsQuery;
            string title = "Consulta de Todos os Attendants";
            string sqlCommandText;

            sqlCommandText = "SELECT * FROM atendente";

            allColumnsQuery = new frmConsultaBasica(title, sqlCommandText, callWidth, callWidth);
            allColumnsQuery.Show();
        }
        private void btnSearchByName_Click(object sender, EventArgs e)
        {
            frmConPorNome queryByName;

            queryByName = new frmConPorNome("Nome do Attendant:", "Consulta de Attendants por Nome", "atendente", "nome_atend", callWidth, callHeight);
            queryByName.Show();
        }
        private void btnSearchByCode_Click(object sender, EventArgs e)
        {
            frmConPorCodigo queryByCode;

            queryByCode = new frmConPorCodigo("Código do Attendant:", "Consulta de Attendants por Código", "atendente", "cod_atend", callWidth, callHeight);
            queryByCode.Show();
        }
        private void btnAttendant_Click(object sender, EventArgs e)
        {
            frmInfoConsultas attendantSalesQuery = new frmInfoConsultas(frmInfoConsultas.Querys.AttendantSales, callWidth, callHeight);

            attendantSalesQuery.Show();
        }
        private void btnTopAttendants_Click(object sender, EventArgs e)
        {
            frmInfoConsultas topAttendantsQuery = new frmInfoConsultas(frmInfoConsultas.Querys.TopAttendants, callWidth, callHeight);

            topAttendantsQuery.Show();
        }
        
        //Volta p/ frmConsultaPrincipal
        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();

        }
    }
}
